import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

// 引入页面组件
import  Index  from  "../views/index/Index.vue"
import  Cate  from "../views/cate/Cate.vue"
import  Login  from  "../views/login/Login.vue"
import Home from  "../views/home/Home.vue"

import Reg from  "../views/reg/Reg.vue"

const router = new VueRouter({
  routes:[
    { path:"/index",component:Index },
    { path:"/reg",component:Reg },
    { path:"/login",component:Login },
    { path:"/home",component:Home },
    { path:"/cate",component:Cate },
    { path:"/",redirect:"/index" },
    { path:"*",redirect:"/index" }
  ]
})

export default router
